<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>搜索 - 日记小程序</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        }
        body {
            background-color: #f7f7f7;
            color: #333;
        }
        .header {
            background-color: white;
            padding: 15px;
            position: relative;
            display: flex;
            align-items: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }
        .back-btn {
            color: #999;
            font-size: 18px;
            margin-right: 10px;
        }
        .search-container {
            flex: 1;
            display: flex;
            align-items: center;
            background-color: #f5f5f5;
            border-radius: 20px;
            padding: 8px 15px;
        }
        .search-icon {
            color: #999;
            font-size: 14px;
            margin-right: 8px;
        }
        .search-input {
            border: none;
            outline: none;
            background-color: transparent;
            flex: 1;
            font-size: 14px;
        }
        .clear-btn {
            color: #ccc;
            font-size: 14px;
            padding: 5px;
        }
        .filter-tags {
            display: flex;
            overflow-x: auto;
            padding: 15px;
            background-color: white;
            border-bottom: 1px solid #eee;
        }
        .filter-tag {
            padding: 5px 12px;
            background-color: #f5f5f5;
            color: #666;
            border-radius: 15px;
            margin-right: 10px;
            font-size: 12px;
            white-space: nowrap;
        }
        .filter-tag.active {
            background-color: #e1f5ea;
            color: #42b983;
        }
        .search-history {
            padding: 15px;
        }
        .history-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 15px;
        }
        .history-title {
            font-size: 14px;
            color: #666;
            font-weight: bold;
        }
        .clear-history {
            font-size: 12px;
            color: #999;
        }
        .history-list {
            display: flex;
            flex-wrap: wrap;
        }
        .history-item {
            background-color: #f5f5f5;
            color: #666;
            border-radius: 15px;
            padding: 5px 12px;
            margin-right: 10px;
            margin-bottom: 10px;
            font-size: 12px;
            display: flex;
            align-items: center;
        }
        .history-icon {
            color: #999;
            font-size: 10px;
            margin-right: 5px;
        }
        .search-results {
            padding: 15px;
        }
        .result-title {
            font-size: 14px;
            color: #666;
            font-weight: bold;
            margin-bottom: 15px;
        }
        .diary-item {
            background-color: white;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 15px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .diary-date {
            font-size: 12px;
            color: #999;
            margin-bottom: 5px;
        }
        .diary-mood {
            display: inline-block;
            padding: 2px 8px;
            background-color: #e1f5ea;
            color: #42b983;
            border-radius: 10px;
            font-size: 12px;
            margin-bottom: 8px;
        }
        .diary-content {
            font-size: 14px;
            line-height: 1.5;
            margin-bottom: 10px;
        }
        .highlight {
            background-color: #ffe066;
            border-radius: 2px;
        }
        .no-results {
            text-align: center;
            padding: 50px 0;
            color: #999;
        }
        .no-results-icon {
            font-size: 40px;
            margin-bottom: 15px;
            color: #ddd;
        }
        .no-results-text {
            font-size: 14px;
        }
    </style>
</head>
<body>
    <div class="header">
        <div class="back-btn">
            <i class="fas fa-arrow-left"></i>
        </div>
        <div class="search-container">
            <div class="search-icon">
                <i class="fas fa-search"></i>
            </div>
            <input type="text" class="search-input" placeholder="搜索日记内容、地点、标签...">
            <div class="clear-btn">
                <i class="fas fa-times-circle"></i>
            </div>
        </div>
    </div>

    <div class="filter-tags">
        <div class="filter-tag active">全部</div>
        <div class="filter-tag">内容</div>
        <div class="filter-tag">地点</div>
        <div class="filter-tag">标签</div>
        <div class="filter-tag">心情</div>
        <div class="filter-tag">天气</div>
        <div class="filter-tag">日期</div>
    </div>

    <!-- 历史记录部分 -->
    <div class="search-history">
        <div class="history-header">
            <div class="history-title">搜索历史</div>
            <div class="clear-history">清空</div>
        </div>
        <div class="history-list">
            <div class="history-item">
                <div class="history-icon">
                    <i class="fas fa-history"></i>
                </div>
                <span>公园</span>
            </div>
            <div class="history-item">
                <div class="history-icon">
                    <i class="fas fa-history"></i>
                </div>
                <span>开心</span>
            </div>
            <div class="history-item">
                <div class="history-icon">
                    <i class="fas fa-history"></i>
                </div>
                <span>朋友</span>
            </div>
            <div class="history-item">
                <div class="history-icon">
                    <i class="fas fa-history"></i>
                </div>
                <span>晴天</span>
            </div>
        </div>
    </div>

    <!-- 搜索结果部分 -->
    <div class="search-results" style="display: none;">
        <div class="result-title">共找到 3 条结果</div>
        <div class="diary-item">
            <div class="diary-date">2023年4月18日 星期二 晴</div>
            <div class="diary-mood">开心</div>
            <div class="diary-content">今天是美好的一天，早上去<span class="highlight">公园</span>跑步，遇到了许多可爱的小狗。中午和朋友一起吃了午饭，下午完成了工作任务，感觉很充实！</div>
        </div>
        <div class="diary-item">
            <div class="diary-date">2023年4月10日 星期一 晴</div>
            <div class="diary-mood">平静</div>
            <div class="diary-content">这个周末和家人一起去了城市<span class="highlight">公园</span>，看到了美丽的樱花，拍了很多照片。</div>
        </div>
        <div class="diary-item">
            <div class="diary-date">2023年3月21日 星期二 多云</div>
            <div class="diary-mood">开心</div>
            <div class="diary-content">今天下班后去了新开的中央<span class="highlight">公园</span>，环境很好，空气清新，以后可以常去那里跑步。</div>
        </div>
    </div>

    <!-- 无搜索结果部分 -->
    <div class="no-results">
        <div class="no-results-icon">
            <i class="fas fa-search"></i>
        </div>
        <div class="no-results-text">
            输入关键词开始搜索
        </div>
    </div>
</body>
</html> 